<template>
  <div class="">
    <swiper class="swiper" :options="swiperOption">
      <swiper-slide class="s-slide" v-for="(item, index) in slide" :key="index">
        Slide {{item}}
      </swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
import 'swiper/dist/css/swiper.css' // 引入vue-awesome-swiper
import {swiper, swiperSlide} from 'vue-awesome-swiper'

export default {
  name: '',
  data () {
    return {
      slide: [1, 2, 3, 4, 5, 6],
      swiperOption: {
        direction: 'vertical',
        pagination: '.swiper-pagination',
        slidesPerView: 'auto',
        centeredSlides: true,
        paginationClickable: true,
        spaceBetween: 30
      }
    }
  },
  components: {
    swiper,
    swiperSlide
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style  lang="stylus" scoped>
.swiper
  height: 7rem
  border-top: 1px solid #ccc
  border-bottom: 1px solid #ccc
  .s-slide
    height: 4rem
    text-align: center
    line-height: 4rem

</style>
